/*$.fn.extend({
    animateCss: function (animationName,fuc) {
        var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
        this.addClass('animated ' + animationName).one(animationEnd, function() {
            $(this).removeClass('animated ' + animationName);
            if(fuc) fuc();
        });
    }
});*/

$(function () {
    var url = location.pathname,
        arry = url.split('/'),
        page = arry[arry.length-1];
    var pageArr = ['index.html','introduct.html','rule.html','news.html','works.html','contact.html', 'review.html','works-detail.html'];
    // console.log(page)
    for (var i = 0;i<pageArr.length;i++){
        if(page==pageArr[i]){
            var index = i
            if(index==7){
                index=4;
            }
            $('nav a').eq(index).addClass('active');

        }
    }
    if(!page){
        $('nav a').eq(0).addClass('active');
    }
})